package kr.co.sdsway2.dao;

import java.util.List;

import kr.co.sdsway2.common.AbstractDAO;
import kr.co.sdsway2.vo.PollInfVO;

import org.springframework.stereotype.Repository;

@Repository
public class PollInfDAO extends AbstractDAO {

	/** INSERT */
	public void insertPollInf(PollInfVO inVO) {
		getSqlMapClientTemplate().insert("insertPollInf", inVO);
	}

	/** UPDATE */
	public void updatePollInf(PollInfVO inVO) {
		getSqlMapClientTemplate().update("updatePollInf", inVO);
	}

	/** DELETE */
	public void deletePollInf(PollInfVO inVO) {
		getSqlMapClientTemplate().update("deletePollInf", inVO);
	}

	/** SELECT */
	public PollInfVO getPollInf(PollInfVO inVO) {
		return (PollInfVO)getSqlMapClientTemplate().queryForList("getPollInf", inVO);
	}

	/** SELECT LIST */
	@SuppressWarnings("unchecked")
	public List<PollInfVO> getPollInfList() {
		return (List<PollInfVO>)getSqlMapClientTemplate().queryForList("getPollInfList");
	}

	/** SELECT POLL_ID */
	public Integer getPollId() {
		return (Integer)getSqlMapClientTemplate().queryForObject("getPollId");
	}

}
